<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>文章管理-文章列表</title>
    <jsp:include page="../../include/base.jsp"></jsp:include>
	<jsp:include page="../../include/common.jsp"></jsp:include>
	<jsp:include page="../../include/baseManage.jsp"></jsp:include>
  </head>
  <body>   
  	<div class="mini-toolbar" style="border:0;font-size:12px;padding-left:6px;"> 
        <!-- 操作面板 -->
        <div class="operatePanel">
	       	<input class="mini-button" text="添加文章" iconCls="icon-addnew" plain="false" 
	       		onclick="ArticlesHandler.addArticles" visible="false" id="articles_list_add"/>
	       	<input class="mini-button" text="编辑文章" iconCls="icon-edit" plain="false" 
	       		onclick="ArticlesHandler.editArticles" visible="false" id="articles_list_edit"/>
	       	<input class="mini-button" text="删除文章" iconCls="icon-remove" plain="false" 
	       		onclick="ArticlesHandler.delArticles" visible="false" id="articles_list_del"/>
	       	<input class="mini-button" text="展开查询" iconCls="icon-btn-expand" plain="false" 
		       	onclick="ArticlesHandler.queryArticles" visible="false" id="articles_list_query"/>
	       	<input class="mini-button" text="刷新" iconCls="icon-btn-refresh" plain="false" 
	       		onclick="ArticlesHandler.afresh" visible="false" id="articles_list_refresh"/>
	    </div>
	    <!-- 查询面板 -->
	    <div id="queryArticlesDiv" class="queryPanel">
	    	<label class="queryPanelLbl">文章分类：</label>
	    	<input id="queryBagTree" name="queryBagTree" class="mini-treeselect" popupWidth="160"  
       			valueField="bagId" parentField="bagParent" textField="bagName" width="130"
       			url="<%=path %>/getBagTreeSelect.do?type=query" value="-1" />
	    	<label class="queryPanelLbl">文章标题：</label>
	    	<input class="mini-textbox" id="query_baiTitle"/>
	    	<label class="queryPanelLbl">文章状态：</label>
	    	<input class="mini-combobox" id="query_baiState" textField="text" valueField="id"/>
	    	<input class="mini-button" text="查询" iconCls="icon-btn-search" plain="false" 
	    		onclick="ArticlesHandler.doQueryArticles"/>
	    </div>
    </div>
    <div class="mini-fit" id="articlesPanel">
	    <div id="articlesGrid" class="mini-datagrid" fitColumns="true" style="width:100%;height:100%;" 
	    	multiSelect="true" pageSize="20" borderStyle="border-bottom:0;border-left:0;border-right:0;"
	    	virtualScroll="true" idField="baiId" url="<%=path %>/getBaiList.do">
	        <div property="columns">
	        	<div type="checkcolumn" ></div>
	            <div type="indexcolumn" width="40" headerAlign="center">序号</div>
	            <div field="baiTitle" name="baiTitle" width="100%" headerAlign="center" allowSort="true">文章标题</div>    
	            <div field="baiGroup" name="baiGroup" width="260" headerAlign="center" allowSort="true" visible="false">文章分类</div>
	            <div field="bagName" name="bagName" width="260" headerAlign="center" allowSort="true">文章分类</div>
	            <div field="baiTime" name="baiTime" width="160" headerAlign="center" allowSort="true" align="center">发布时间</div>
	            <div field="baiOrder" name="baiOrder" width="100" headerAlign="center" align="center" allowSort="true">文章排序</div>
	            <div field="baiState" name="baiState" width="100" headerAlign="center" align="center" allowSort="true">文章状态</div>
	            <div field="baiOption" name="baiOption" width="100" headerAlign="center" align="center" allowSort="true">操作</div>
	        </div>
	    </div>
    </div>
  </body>
  <script src="handler/ArticlesHandler.js" type="text/javascript"></script>
</html>
